package cn.hamster3.mc.plugin.ball.common.event.message;

import cn.hamster3.mc.plugin.ball.common.data.BallMessage;
import lombok.Getter;
import lombok.Setter;
import org.jetbrains.annotations.NotNull;

@Getter
@Setter
public class MessageEvent extends BallMessage {
    /**
     * 消息的频道
     */
    @NotNull
    private String channel;

    public MessageEvent(@NotNull String channel, @NotNull BallMessage message) {
        this.channel = channel;
        setSenderID(message.getSenderID());
        setReceiverID(message.getReceiverID());
        setReceiverType(message.getReceiverType());
        setAction(message.getAction());
        setContent(message.getContent());
    }
}
